package com.careerraiser.xtra.thread;

public class MyRunnable implements Runnable {
 int myTimeout=1000;
 String name = "test";
 static TestSynchronize syncObject = new TestSynchronize(); 
	public MyRunnable (int timeout, String myName){
		myTimeout=timeout;
		name=myName;
 }
	@Override
	public void run() {
		Thread.currentThread().setName(name);
		try {
			System.out.println("inside runnable - "+name);
			Thread.sleep(myTimeout);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		syncObject.testSyncBlock();
		System.out.println("thread completed - "+ name);

	}

}
